﻿#pragma once

#include "Configuration.h"

class Object
{
public:
  Object(const Configuration& cfg)
    : _cfg(cfg){};

  virtual ~Object() = default;

protected:

  template<typename T>
  T Get(const std::string& name) const
  {
    return _cfg.Get<T>(name);
  }

  template<typename T>
  T Get(const std::string& name, T&& default) const
  {
    return _cfg.Get<T>(name, default);
  }


private:
  const Configuration& _cfg;
};
